package com.elf.zero.widget;

import android.content.Context;
import android.util.AttributeSet;

import java.util.ArrayList;
import java.util.List;

public class CityPicker extends MultipleLevelPicker<String> {

    public CityPicker(Context context) {
        super(context);
    }

    public CityPicker(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    protected String getDisplayName(String item) {
        return item;
    }

    @Override
    protected List<String> createList(int level, String item) {
        List<String> list = new ArrayList<>();
        for (int i = 0; i < 30; i++) {
            list.add("itme" + (level * 100 + i));
        }
        return list;
    }

    @Override
    protected void selectedItem(String item) {
        showToast(item);
    }
}
